<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/1/21
 * Time: 11:18
 */

require 'vendor/Phpquery/autoload.php';

use QL\QueryList;

//
//$hj = QueryList::Query('http://mobile.csdn.net/',array(
//    "url"=>array('.unit h1 a','href')
//));
//$data = $hj->getData(function($x){
//    return $x['url'];
//});
//print_r($data);

// 待采集的页面地址
$url = 'https://www.meipian.cn/2n531vt8';

// 采集规则
$rules = [
    // 文章标题
    'title' => ['.title>h1','text'],
    // 发布日期
    'date' => ['.meta>span:eq(0)','text'],
    // 文章内容
    'content' => ['#artibody','html']
];

$r = ['con'=>['.content_foot','html']];

$data = QueryList::Query($url,$r)->data;

print_r($data);